﻿<%@ Page Title="" Language="C#" MasterPageFile="../masterpages/umbracoPage.Master"
    AutoEventWireup="true" CodeBehind="ViewBusinessIdentityProviderMappings.aspx.cs" Inherits="umbraco.ViewBusinessIdentityProviderMappings" %>

<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>

<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">
    <cc1:UmbracoPanel ID="MainPanel" runat="server">
        <cc1:Pane ID="Pane2" runat="server">
            <div>
                <h3>Authorization rules for one identity provider</h3>
                <p>
                    Use this section to tell Umbraco how to deal with members coming from federated business identity providers (IP).
                </p>
                <p>
                    For every member role you defined in Umbraco, you can create mappings which establish under which condition a federated member should be assigned to that role.
                </p>
                <p>
                    The mappings are expressed as simple rules: if a member coming from a given IP bears a claim of a certain type with a given value, then he or she is considered as belonging to the member group where the rule has been created.
                </p>
                <p>
                    To know more about rules see <a target="_blank" href="http://umbracoacsextensions.codeplex.com/documentation">http://umbracoacsextensions.codeplex.com/documentation</a>
                </p>
            </div>
        </cc1:Pane>
        
        <asp:Repeater ID="MemberGroupsMappingsRepeater" runat="server" OnItemDataBound="BindMemberGroupMappings">
            <HeaderTemplate><div></HeaderTemplate>
            <ItemTemplate>
                <cc1:Pane runat="server">
                    <h4><asp:Literal runat="server" ID="MemberGroupTitle" /></h4>
                    <asp:Repeater ID="MappingsRepeater" OnItemDataBound="BindMapping" runat="server">
                        <HeaderTemplate>
                            <table rules="rows" border="0" class="members_table">
                                <thead>
                                    <tr>
                                        <th style="width:250px;">Incoming Claim Type</th>
                                        <th style="width:200px;">Incoming Claim Value</th>
                                        <th></th>
                                    </tr>
                                </thead>
                                <tbody>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                <td><asp:Literal ID="ClaimType" runat="server"></asp:Literal></td>
                                <td><asp:Literal ID="ClaimValue" runat="server"></asp:Literal></td>
                                <td>
                                    <asp:Button ID="EditButton" runat="server" Text="Edit" />
                                    <asp:Button ID="DeleteButton" runat="server" Text="Delete" OnCommand="DeleteMapping" Visible="false" />
                                </td>
                            </tr>
                        </ItemTemplate>
                        <AlternatingItemTemplate>
                            <tr class="alt">
                                <td><asp:Literal ID="ClaimType" runat="server"></asp:Literal></td>
                                <td><asp:Literal ID="ClaimValue" runat="server"></asp:Literal></td>
                                <td>
                                    <asp:Button ID="EditButton" runat="server" Text="Edit" />
                                    <asp:Button ID="DeleteButton" runat="server" Text="Delete" OnCommand="DeleteMapping" Visible="false" />
                                </td>
                            </tr>
                        </AlternatingItemTemplate>
                        <FooterTemplate>
                                </tbody>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                </cc1:Pane>
            </ItemTemplate>
            <FooterTemplate></div></FooterTemplate>
        </asp:Repeater>
    </cc1:UmbracoPanel>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="footer" runat="server">
</asp:Content>